package com.idemon.ds.util;

import com.idemon.config.Consts;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

public class SessionInterceptor implements Interceptor {

	public void intercept(Invocation inv) {
		Object obj = inv.getController().getSessionAttr(Consts.ATTR_KEY_SESSION_USER);
		if(obj != null){
			inv.getController().setAttr(Consts.ATTR_KEY_SESSION_USER, obj);
		}
		inv.invoke();
	}

}
